package com.tgy.helloworld.utils;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/***
 * @ClassName: Tool
 * @Description: 测试aop的工具类
 * @Auther: 送你一块二向箔
 * @Date: 17:25 2022/4/23
 * @version : V1.0
 */
@Component
public class Tool {

    public void test(){
        LocalDateTime now = LocalDateTime.now();
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("时间是:yyyy-MM-dd HH:mm:ss");
        System.out.println(now.format(dateTimeFormatter));
    }
}
